package com.company;

import java.util.Scanner;
import com.company.Scene;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        startGame();
        System.out.println("游戏结束了  是否重来(数据不会消除)  y/n");


        String s = scanner.nextLine();

        if(s.equals("y")){

            startGame();
        }if (s.equals("n")){
            System.out.println("bye bye");
            System.exit(0);
        }else{
            System.out.println("都玩了这么久还乱输指令！ 拜拜。");
            System.exit(0);
        }

    }
    public static void startGame(){
        Scene scene=new Scene();
        Scanner scanner=new Scanner(System.in);
        System.out.println("亲爱的勇士在开始游戏开始之前请输入你的名字：");
        String name=scanner.nextLine();
        scene.initScene(name);
        scene.play();

    }
}
